#include "uart_task.h"
#include "usart.h"

uint8_t buff[12] = {0};

void UART_Task(void)
{
  HAL_UART_Transmit(&huart1, (uint8_t *)"hello\n", sizeof("hello\n"), 50);
  HAL_UART_Receive_IT(&huart1 , buff, 1);
}

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
  if(&huart1 == huart)
  {
    HAL_UART_Transmit(&huart1, buff, 1, 10);
    HAL_UART_Receive_IT(&huart1, buff, 1);
  }
}
